<tagLib name="html" />
<include file="Public:header" />
			<include file="Public:menu" />
			<div id="right">
				<div>
					<div id="boardheader">
						<img src="__PUBLIC__/Uploads/group/{$group['img']}"/>
						<p class="grouptop">{$group['name']}-- 讨论区</p>
						<p class="backgroup"><a href="__APP__/showgroup/{$group['id']}">返回群组</a></p>

					</div>
					<?php 
						if($list == "noAccess" ){
					 ?>
					<p>你不是群组成员，<a href="__URL__/joingroup/id/{$group['id']}">加入</a>后才能查看讨论区。</p>
					<?php }else{ ?>
					<div class="groupbody">
						<table class="topiclisttable">
							<tbody>
								<tr>
									<th class="title">主题</th>
									<th class="author">作者</th>
									<th class="review">最后发言</th>
								</tr>
								<volist name="list" id="topic">
								<tr>
									<td class="title">
										<a href="__APP__/showtopic/{$topic['id']}">{$topic['title']}</a>
									</td>
									<td class="author">
										<a href="">{$topic['username']}</a>
									</td>
									<td class="review">
										{$topic['lastuserid']|getUsernameByUserid}<br/>
										{$topic['lastreverttime']|toDate}
									</td>
								</tr>
								</volist>
							</tbody>
						</table>
						<p>
							{$page}
						</p>
					</div>
					<?php 
						if($isManager == 0){
					 ?>
					<div>你还不是群组成员，请<a href="__URL__/joingroup/id/{$group['id']}">加入</a>后发表话题</div>
					<?php }else{ ?>
					<div class="newtopic">
						<a name="newtopic"></a>
						<h4>
							发表新主题
						</h4>
						<form action="__URL__/savetopic" method="post">
						<p class="newtopic">
							<label>标题</label>
							<input type="text" name="title"/>
						</p>
						<p class="newtopic">
							<label>内容</label>
							<script type="text/javascript" src="__PUBLIC__/Js/FCKeditor/fckeditor.js"></script>
							<textarea id="content" name="content"></textarea>
							<script type="text/javascript"> 
								var oFCKeditor = new FCKeditor( "content","340px;","200px","Basic" ) ; 
								oFCKeditor.BasePath = "__PUBLIC__/Js/FCKeditor/" ; 
								oFCKeditor.ReplaceTextarea() ;
								function resetEditor(){setContents("content",document.getElementById("content").value)}; 
								function saveEditor(){document.getElementById("content").value = getContents("content");} 
							</script>
						</p>
						<p class="si">
							<input type="hidden" name="groupid" value="{$group['id']}"/>
							<input type="submit" value="发表新主题" class="input2"/>
						</p>
						</form>
					</div>
					<?php }} ?>
				</div>
			</div>
<include file="Public:footer" />